package leasingcompany;

public class KCPassCar extends Vechile {
    private int zw;

    public KCPassCar() {
    }

    public KCPassCar(String license, String brand, int dateRent, int zw) {
        super(license, brand, dateRent);
        this.zw=zw;
    }

    public int getZw() {
        return zw;
    }

    public void setZw(int zw) {
        this.zw = zw;
    }

    @Override
    public double rent(int days) {
        double money=this.getDateRent()*days;
        if(days>=3 && days<7){
            money *= 0.9;
        }else if(days>=7 && days<30){
            money *= 0.8;
        }else if(days>=30 && days<150){
            money *= 0.7;
        }else if(days>=150){
            money*= 0.6f;
        }
        System.out.println("用费："+money);
        return money;
    }
    public void show(){
        String s=isState()? "可租" : "已出租";
        System.out.println("车牌号："+getId()+",品牌："+getBrand()+",日租金："+getDateRent()+",座位："+getZw()+"出租状态："+s);
    }
}
